<?php
/**
 * IQ request object
 * 
 * @package stanza.iq
 */
abstract class Zend_Jabber_Stanza_Request_Iq_Abstract extends Zend_Jabber_Stanza_Request_Abstract {
    // Request objects
    const TYPE_GET = 'get';
    const TYPE_SET = 'set';
    
    /**
     * Iq node
     * 
     * @var DomElement
     */
    protected $iqNode;

    /**
     * Create new iq request object
     */
    public function __construct() {
        parent::__construct();
        
        $this->iqNode = $this->dom->createElement('iq');
        $this->iqNode->setAttribute('id', $this->getId());
        $this->iqNode->setAttribute('type', $this->getType());
        
        $this->dom->appendChild($this->iqNode);
    }    
    
    /**
     * Get namespace used by iq first child
     * 
     * @return string
     */
    abstract public function getNamespace();
}
?>